package structure_pattern.observer_pattern;

/**
 * @author Feili
 * @since 2022/6/9 17:37
 * 抽象观察类
 */
public class User {

    private String name;

    public User(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void notice(Integer price) {
        System.out.println(this.name + "收到价格涨幅为：" + price);
    }
}
